 <meta charset="utf-8">

<div class="box box-primary" id="app_metting_edit">
 <script src="/static/lib/laydate/laydate.js" type="text/javascript" ></script>
 
            <!-- form start -->
            <form role="form" id=metting_edit_form>
              <div class="box-body">
              
                <div class="form-group">
                  <label for="title">会议名称</label>
                  <input type="text" name="title" v-model="met.title" class="form-control" id="title" placeholder="请输入用户名称"  required aria-required="true" >
                </div>
                  <div class="form-group">
                  <label for="password">会议开始时间</label>
                  <input type="text" name="metStartTime"   v-model="met.metStartTime"  class="form-control" id="metStartTime" placeholder="请输入开始时间" required>
                </div>
                
                <div class="form-group">
                  <label for="password">会议结束时间</label>
                  <input type="text" name="metEndTime"   v-model="met.metEndTime"  class="form-control" id="metEndTime" placeholder="请输入结束时间" required>
                </div>
                
                     <div class="form-group">
                  <label for="password">报名开始时间</label>
                  <input type="text" name="signupStartTime"   v-model="met.signupStartTime"  class="form-control" id="signupStartTime" placeholder="请输入开始时间" required>
                </div>
                
                <div class="form-group">
                  <label for="metEndTime">报名结束时间</label>
                  <input type="text" name="signupEndTime"  v-model="met.signupEndTime"  class="form-control" id="signupEndTime" placeholder="请输入结束时间" required>
                </div>
                
               <div class="row form-group">
                <div class="col-md-6">
	                <div id="uploader-demo" class="form-group">
	                
					    <div id="fileList" class="uploader-list"></div>
					    <div id="filePicker">选择图片</div>
					</div>
               </div>
                <div class="col-md-6">
	              <img alt="" src="" width="90" height="60" id="metLogo">
               </div>
               </div>

              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancle">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="doCreate">提交</button>
              </div>
            </form>

<script type="text/javascript">

	
var uploader ;
$(function(){


	laydate.render({elem: '#metStartTime',type: 'datetime'});
	laydate.render({elem: '#metEndTime',type: 'datetime'});
	laydate.render({elem: '#signupStartTime',type: 'datetime'});
	laydate.render({elem: '#signupEndTime',type: 'datetime'});
	uploader = WebUploader.create({
	    auto: true,
	    swf:   '/static/lib/webuploader/Uploader.swf',
	    server: 'metting/ma/metMetting/uploadLogo',
	    pick: '#filePicker',
	    accept: {
	        title: 'Images',
	        extensions: 'gif,jpg,jpeg,bmp,png',
	        mimeTypes: 'image/*'
	    }
	}).on( 'uploadSuccess', function( data , response) {
		vm.$data.met.metLogo=response.data.image;
		$("#metLogo").attr("src",response.data.image);
	}).on( 'uploadError', function( file , response) {
		alertSwal.warningText(response.data.message);
	});
});

var vm = new Vue({
        el: '#app_metting_edit',
        data:  {
    		met:{
    			title:'',
        		metLogo:'',
        		metStartTime:'',
        		metEndTime:'',
        		signupStartTime:'',
        		signupEndTime:'',
        		metLogo: ''
    		}
     }, mounted: function(){
    	 var _this=this;
    		
     },
         methods: {
        	 doCreate: function () {
        		 var _this=this;
        		 _this.$data.met.metEndTime=$("#metEndTime").val();
        		 _this.$data.met.metStartTime=$("#metStartTime").val();
        		 _this.$data.met.signupStartTime=$("#signupStartTime").val();
        		 _this.$data.met.signupEndTime=$("#signupEndTime").val();
        	    	if($("#metting_edit_form").valid()){
        	    		var url="metting/ma/metMetting/createMetMetting";
        	    		zfesAjax.ajaxTodo(url,_this.$data.met, function(data){
        	    			alertSwal.successText(data.message);
        	    			 layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	    cancle:function(){
        	    	 layer.close(layer.index);
        	    	 
        	    }
        }
    })

 </script>
</div>